Interface ComponentItem

All Superinterfaces:
IPCObject
All Known Implementing Classes:
ComponentItemImpl

public interface ComponentItem extends IPCObject
Information provided by the PKI file:

    \class ComponentItem
    
    \brief ComponentItem handles and manipulates component items, such as devices, on the workspace.
    
    \example appWindow().getActiveWorkspace().getLogicalWorkspace().getComponentItem("Router0")
    
Author:
Auto-generated
  • Method Details

    • getName

      String getName()
      Information provided by the PKI file:
      
          \brief Returns the name of this component item
          
          \return QString, name of the component item.
          
              
      Returns:
      String Returns a String
    • setVisible

      void setVisible(boolean bVisible)
      Information provided by the PKI file:
      
          \brief Shows or hides the component item.
          
          \param bVisible, true to show the component item, false to hide it.
          
              
      Parameters:
      bVisible - Takes in a parameter of bVisible
    • type

      int type()
      Information provided by the PKI file:
      
          \brief Returns the type of the component item.
          
          \return int,        the type of component.
          Types:                      COMPONENT = 1100,
          CONNECTION = 1101,
          NOTE = 1102,
          PACKET = 1103,
          CLUSTER = 1104,
          RECTANGLE = 1105,
          LINE = 1106,
          ELLIPSE = 1107,
          MULTIUSERITEM = 1108,
          QOSPACKET = 1109,
          RESIZEINDICATOR = 1110,
          ACCESSORYITEM = 1111,
          POLYGON = 1112,
          TEXTPOPUP = 1113
          
              
      Returns:
      int Returns a int
    • moveBy

      void moveBy(double x, double y)
      Information provided by the PKI file:
      
          \brief Moves the component item by the specified x and y values.
          
          \param x, the value to move the component item by on the x-axis.
          \param y, the value to move the component item by on the y-axis.
          
              
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
    • moveTo

      void moveTo(double x, double y)
      Information provided by the PKI file:
      
          \brief Moves the component item to the specified coordinates.
          
          \param x, the value to move the component item to on the x-axis.
          \param y, the value to move the component item to on the y-axis.
          
              
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
    • device

      Device device()
      Information provided by the PKI file:
      
          \brief Returns the device.
          
          \return Device, the device object.
          
              
      Returns:
      Device Returns a Device
    • getXCoordinate

      int getXCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the x-coordinate of the component item.
          
          \return int, the x-coordinate of the component item.
          
              
      Returns:
      int Returns a int
    • getXCoordinateCenter

      int getXCoordinateCenter()
      Information provided by the PKI file:
      
          \brief Returns the center x-coordinate of the component item.
          
          \return int, the center x-coordinate of the component item.
          
              
      Returns:
      int Returns a int
    • getYCoordinate

      int getYCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the y-coordinate of the component item.
          
          \return int, the y-coordinate of the component item.
          
              
      Returns:
      int Returns a int
    • getYCoordinateCenter

      int getYCoordinateCenter()
      Information provided by the PKI file:
      
          \brief Returns the center y-coordinate of the component item.
          
          \return int, the center y-coordinate of the component item.
          
              
      Returns:
      int Returns a int
    • setX

      void setX(double x)
      Information provided by the PKI file:
      
          \brief Sets the x-coordinate of the component item.
          
          \param x, the x-coordinate of the component item.
          
              
      Parameters:
      x - Takes in a parameter of x
    • setXCenter

      void setXCenter(int x)
      Information provided by the PKI file:
      
          \brief Sets the center x-coordinate of the component item.
          
          \param x, the center x-coordinate of the component item.
          
              
      Parameters:
      x - Takes in a parameter of x
    • setY

      void setY(double y)
      Information provided by the PKI file:
      
          \brief Sets the y-coordinate of the component item.
          
          \param y, the y-coordinate of the component item.
          
              
      Parameters:
      y - Takes in a parameter of y
    • setYCenter

      void setYCenter(int y)
      Information provided by the PKI file:
      
          \brief Sets the center y-coordinate of the component item.
          
          \param y, the y-coordinate of the component item.
          
              
      Parameters:
      y - Takes in a parameter of y
    • getWidth

      int getWidth()
      Returns:
      int Returns a int
    • getHeight

      int getHeight()
      Returns:
      int Returns a int
    • setXVelocity

      void setXVelocity(double xv)
      Information provided by the PKI file:
      
          \brief Sets the x-axis velocity of the component item.
          
          \param xv, the x-axis velocity of the component item.
          
              
      Parameters:
      xv - Takes in a parameter of xv
    • setYVelocity

      void setYVelocity(double yv)
      Information provided by the PKI file:
      
          \brief Sets the y-axis velocity of the component item.
          
          \param yv, the y-axis velocity of the component item.
          
              
      Parameters:
      yv - Takes in a parameter of yv
    • setVelocity

      void setVelocity(double xv, double yv)
      Information provided by the PKI file:
      
          \brief Sets the x-axis and y-axis velocity of the component item.
          
          \param xv, the x-axis velocity of the component item.
          \param yv, the y-axis velocity of the component item.
          
              
      Parameters:
      xv - Takes in a parameter of xv
      yv - Takes in a parameter of yv
    • xVelocity

      double xVelocity()
      Information provided by the PKI file:
      
          \brief Returns the x-axis velocity of the component item.
          
          \return double, the x-axis velocity of the component item.
          
              
      Returns:
      double Returns a double
    • yVelocity

      double yVelocity()
      Information provided by the PKI file:
      
          \brief Returns the y-axis velocity of the component item.
          
          \return double, the y-axis velocity of the component item.
          
              
      Returns:
      double Returns a double
    • setSelected

      void setSelected(boolean bSelected)
      Information provided by the PKI file:
      
          \brief Selects or deselects the component item.
          
          \param bSelected, true to select the item, false to deselect it.
          
              
      Parameters:
      bSelected - Takes in a parameter of bSelected
    • getClusterID

      String getClusterID()
      Information provided by the PKI file:
      
          \brief Returns the cluster ID of the component item.
          
          \return string, the cluster ID of the component item.
          
              
      Returns:
      String Returns a String
    • getThisClusterID

      String getThisClusterID()
      Returns:
      String Returns a String
    • getParent

      ComponentItem getParent()
      Information provided by the PKI file:
      
          \brief Returns the parent cluster that contains this component item.
          
          \return ComponentItem, the parent cluster that contains this component item.
          
              
      Returns:
      ComponentItem Returns a ComponentItem
    • moveOutOfCurrentCluster

      boolean moveOutOfCurrentCluster()
      Information provided by the PKI file:
      
          \brief Moves the component item out of the current cluster and returns whether it was successful.
          
          \return boolean, whether the move was successful.
          
              
      Returns:
      boolean Returns a boolean
    • moveIntoCluster

      boolean moveIntoCluster(String name)
      Information provided by the PKI file:
      
          \brief Moves the component item into a cluster in the same level with the specified name and returns whether it was successful.
          
          \param name, the name of the cluster in the same level
          \return boolean, whether the move was successful.
          
              
      Parameters:
      name - Takes in a parameter of name
      Returns:
      boolean Returns a boolean
    • loadAccessoryImage

      boolean loadAccessoryImage(int slotNum, String imagePath)
      Information provided by the PKI file:
      
          \brief Loads an image for an accessory.
          
          \param slotNum, accessory slot index.
          \param imagePath, path to the image to use for the accessory.
          
          \return bool, true if successful, false if not.
          
              
      Parameters:
      slotNum - Takes in a parameter of slotNum
      imagePath - Takes in a parameter of imagePath
      Returns:
      boolean Returns a boolean
    • removeAccessory

      void removeAccessory(int slotNum)
      Information provided by the PKI file:
      
          \brief Removes an accessory.
          
          \param slotNum, index of the accessory to remove.
          
              
      Parameters:
      slotNum - Takes in a parameter of slotNum